<template>
  <el-container class="home-container">
    <el-header><!-- 头部区 -->
      <div>
        <span id="fontLogo">智能快递柜后台管理系统</span>
      </div>
      <el-menu
          :default-active="activeIndex"
          class="el-menu-demo"
          mode="horizontal"
          @select="handleSelect"
          background-color="#545c64"
          text-color="#fff"
          active-text-color="#ffd04b"
          id="indexMenu">
        <el-menu-item index="1" @click="shouye">首页</el-menu-item>
        <el-menu-item index="2" @click="expressList">会员</el-menu-item>
        <el-menu-item index="3" @click="goToMachine">柜机</el-menu-item>
        <el-menu-item index="4">包裹</el-menu-item>
        <el-menu-item index="5">财务</el-menu-item>
        <el-menu-item index="6">其他</el-menu-item>
      </el-menu>
      <div>
        <span id="fontName">{{this.name}}</span>
      </div>
    </el-header>
    <!-- 页面主体区域 -->
    <el-container>
      <!-- 侧边栏 -->
      <el-aside width="210px" hight="100%">
        <el-menu
            class="el-menu-vertical-demo"
            background-color="#545c64"
            text-color="#fff"
            active-text-color="#ffd04b">

          <el-menu-item index="1">
            <i class="el-icon-menu"></i>
            <span @click="expressList">快递员列表</span>
          </el-menu-item>
          <el-menu-item index="2">
            <i class="el-icon-menu"></i>
            <span slot="title">快递员认证审核</span>
          </el-menu-item>
          <el-menu-item index="4">
            <i class="el-icon-setting"></i>
            <span slot="title">普通会员列表</span>
          </el-menu-item>
        </el-menu>
      </el-aside>
      <!-- 右侧内容主体 -->
      <el-main>
        <div style="margin-left: 20px; margin-top: 20px">
 <span style="color: whitesmoke; text-align: left">
   会员管理/快递员列表/快递员详情
</span>
          <div style="width: 1880px;background-color: whitesmoke; height: 800px">
            <!--          上半部分-->
            <div style="width: 100%; height: 40px; border-color: #181818;text-align: left">
              <span style="font-size: 20px; text-align: left;margin-left: 10px;margin-top: 10px">快递员详情</span>
              <div style="margin-left: 1830px" @click="expressList">
                返回
              </div>
            </div>
            <div style="margin-top: 10px;background-color: whitesmoke;height: 250px;width: 100%;display: flex">
              <div style="width: 200px;height: 200px;background-color: antiquewhite;margin-top: 30px;margin-left: 30px">
                <img src="photo">
              </div>
              <div style="width: 1600px;height: 200px;margin-top: 30px;margin-left: 30px;display: flex">
                <div style="width: 500px;height: 100%;">
                  <div style="width: 100%;height: 65px;text-align: left;font-size: 18px">

                    <span style="margin-left: 20px;margin-top: 20px">真实姓名： {{form.name}}</span>
                  </div>
                  <div style="width: 100%;height: 65px;text-align: left;font-size: 18px">
                    <span style="margin-left: 20px;margin-top: 20px">手机号码：  {{1}}</span>
                  </div>
                  <div style="width: 100%;height: 65px;text-align: left;font-size: 18px">
                    <span style="margin-left: 20px;margin-top: 20px">注册类型：  {{1}}</span>
                  </div>
                </div>

                <div style="width: 500px;height: 100%;">
                  <div style="width: 100%;height: 65px;text-align: left;font-size: 18px">
                    <span style="margin-left: 20px;margin-top: 20px">快递公司：  {{1}}</span>
                  </div>
                  <div style="width: 100%;height: 65px;text-align: left;font-size: 18px">
                    <span style="margin-left: 20px;margin-top: 20px">实名认证：  {{1}}</span>
                  </div>
                  <div style="width: 100%;height: 65px;text-align: left;font-size: 18px">
                    <span style="margin-left: 20px;margin-top: 20px">会员余额：  {{1}}</span>
                  </div>
                </div>

                <div style="width: 500px;height: 100%;">
                  <div style="width: 100%;height: 65px;text-align: left;font-size: 18px">
                    <span style="margin-left: 20px;margin-top: 20px">会员状态：  {{1}}</span>
                    <button @click="1" style="margin-left: 50px">
                      禁用
                    </button>
                  </div>
                  <div style="width: 100%;height: 65px;text-align: left;font-size: 18px">
                    <span style="margin-left: 20px;margin-top: 20px">登录密码：  {{1}}</span>
                    <button @click="1" style="margin-left: 50px">
                      重置
                    </button>
                  </div>
                  <div style="width: 100%;height: 65px;text-align: left;font-size: 18px">
                    <span style="margin-left: 20px;margin-top: 20px">支付密码：  {{1}}</span>
                    <button @click="1" style="margin-left: 50px">
                      清空
                    </button>
                  </div>
                </div>
              </div>
            </div>
            <!--          下半部分-->
            <div style="background-color: whitesmoke;width: 1880px;height: 100%" >
              <el-tabs v-model="activeName" @tab-click="handleClick" style="margin-left: 30px">
                <el-tab-pane label="基本信息" name="first">
                  <div style="text-align: left;margin-top: 30px">
                    <div style="width: 300px;height: 60px;font-size: 20px;">
                      <span style="margin-left: 30px"> ID: {{1}}</span>
                    </div>
                    <div style="width: 300px;height: 60px;font-size: 20px;">
                      <span style="margin-left: 30px"> 真实姓名: {{1}}</span>
                    </div>
                    <div style="width: 300px;height: 60px;font-size: 20px;">
                      <span style="margin-left: 30px"> 手机号码: {{1}}</span>
                    </div>
                    <div style="width: 300px;height: 60px;font-size: 20px;">
                      <span style="margin-left: 30px"> 会员状态: {{1}}</span>
                    </div>
                    <div style="width: 300px;height: 60px;font-size: 20px;">
                      <span style="margin-left: 30px"> 注册类型: {{1}}</span>
                    </div>
                    <div style="width: 300px;height: 60px;font-size: 20px;">
                      <span style="margin-left: 30px"> 登录密码: {{1}}</span>
                    </div>
                    <div style="width: 300px;height: 60px;font-size: 20px;">
                      <span style="margin-left: 30px"> 创建日期: {{1}}</span>
                    </div>
                    <div style="width: 300px;height: 60px;font-size: 20px;">
                      <span style="margin-left: 30px"> 最近登录日期: {{1}}</span>
                    </div>

                  </div>
                </el-tab-pane>
                <el-tab-pane label="快递员认证" name="second">
                  <div style="text-align: left;margin-top: 30px">
                    <div style="width: 300px;height: 60px;background-color: #1890ff;font-size: 20px;">
                      <span style="margin-left: 30px"> 认证状态: {{1}}</span>
                    </div>
                    <div style="width: 300px;height: 60px;background-color: #1890ff;font-size: 20px;">
                      <span style="margin-left: 30px"> 快递公司: {{1}}</span>
                    </div>
                    <div style="width: 600px;height: 300px;background-color: #1890ff;font-size: 20px;margin-top: 20px">
                      <img src="photo" alt="">
                    </div>
                    工牌或名片照片
                  </div>
                </el-tab-pane>
                <el-tab-pane label="实名认证" name="third">
                  <div style="text-align: left;margin-top: 30px">
                    <div style="width: 300px;height: 60px;background-color: #1890ff;font-size: 20px;">
                      <span style="margin-left: 30px"> 认证状态: {{1}}</span>
                    </div>
                    <div style="width: 300px;height: 60px;background-color: #1890ff;font-size: 20px;">
                      <span style="margin-left: 30px"> 证件类型: {{1}}</span>
                    </div>
                    <div style="width: 600px;height: 250px;background-color: #1890ff;font-size: 20px;margin-top: 20px">
                      <img src="photo" alt="">
                    </div>
                    证件正面
                    <div style="width: 600px;height: 250px;background-color: #1890ff;font-size: 20px;margin-top: 20px">
                      <img src="photo" alt="">
                    </div>
                    手持证件正面照
                  </div>
                </el-tab-pane>
                <el-tab-pane label="银行卡信息" name="fourth">
                  <div style="text-align: left;margin-top: 30px">
                    <div style="width: 300px;height: 60px;background-color: #1890ff;font-size: 20px;">
                      <span style="margin-left: 30px"> 绑定状态: {{1}}</span>
                    </div>
                    <div style="width: 300px;height: 60px;background-color: #1890ff;font-size: 20px;">
                      <span style="margin-left: 30px"> 国家: {{1}}</span>
                    </div>
                    <div style="width: 300px;height: 60px;background-color: #1890ff;font-size: 20px;">
                      <span style="margin-left: 30px"> 开户银行: {{1}}</span>
                    </div>
                    <div style="width: 300px;height: 60px;background-color: #1890ff;font-size: 20px;">
                      <span style="margin-left: 30px"> 银行卡号: {{1}}</span>
                    </div>
                    <div style="width: 300px;height: 60px;background-color: #1890ff;font-size: 20px;">
                      <span style="margin-left: 30px"> 开户人: {{1}}</span>
                    </div>
                    <div style="width: 300px;height: 60px;background-color: #1890ff;font-size: 20px;">
                      <span style="margin-left: 30px"> 绑定时间: {{1}}</span>
                    </div>
                  </div>
                </el-tab-pane>
                <el-tab-pane label="账户信息" name="fifth">
                  <div style="text-align: left;margin-top: 30px">
                    <div style="width: 300px;height: 60px;background-color: #1890ff;font-size: 20px;">
                      <span style="margin-left: 30px"> 会员余额: {{1}}</span>
                    </div>
                    <div style="width: 300px;height: 60px;background-color: #1890ff;font-size: 20px;">
                      <span style="margin-left: 30px"> 支付密码: {{1}}</span>
                    </div>
                    <div style="width: 300px;height: 60px;background-color: #1890ff;font-size: 20px;">
                      <span style="margin-left: 30px"> 账户状态: {{1}}</span>
                      <button @click="1" style="margin-left: 50px">
                        冻结
                      </button>
                    </div>
                  </div>
                </el-tab-pane>
              </el-tabs>


            </div>
          </div>
        </div>
      </el-main>
    </el-container>
  </el-container>
</template>

<script>
// import {listExpressList} from "@/api/expressList/expressList";
// import axios from "axios";
export default {
  data() {
    return {
      form: {},
      activeName: 'first',
      phone:null,
    };
  },
  created() {
    // axios.get("http://localhost:10020/expressList/getDetialList?phone="+16627709352).then(response =>{
    //   this.form = response.data;
    //   console.log(this.expressListList)
    //   // 加载状态结束
    //   this.loading = false;
    // })

  },
  methods: {
    handleClick(tab, event) {
      console.log(tab, event);
    },
    shouye(){
      this.$router.push(
          {path: "/homeIndex"}
      )
    },
    expressList(){
      this.$router.push(
          {path: "/expressList"}
      )
    },
    getList() {
      this.loading=true;
      // 异步更新数据
      // axios.get("http://localhost:10020/expressList/list").then(response =>{
      //   this.expressListList = response.data;
      //   console.log(this.expressListList)
      //   // 加载状态结束
      //   this.loading = false;
      // })

    },
    /*跳转柜机页面*/
    goToMachine(){
      this.$router.push(
          {path: "/machineHome"}
      )
    },


  },
  filters:{
    format(value,arg){
      function dateFormat(date, format) {
        if (typeof date === "string") {
          var mts = date.match(/(\/Date\((\d+)\)\/)/);
          if (mts && mts.length >= 3) {
            date = parseInt(mts[2]);
          }
        }
        date = new Date(date);
        if (!date || date.toUTCString() == "Invalid Date") {
          return "";
        }
        var map = {
          "M": date.getMonth() + 1, //月份
          "d": date.getDate(), //日
          "h": date.getHours(), //小时
          "m": date.getMinutes(), //分
          "s": date.getSeconds(), //秒
          "q": Math.floor((date.getMonth() + 3) / 3), //季度
          "S": date.getMilliseconds() //毫秒
        };
        format = format.replace(/([yMdhmsqS])+/g, function (all, t) {
          var v = map[t];
          if (v !== undefined) {
            if (all.length > 1) {
              v = '0' + v;
              v = v.substr(v.length - 2);
            }
            return v;
          } else if (t === 'y') {
            return (date.getFullYear() + '').substr(4 - all.length);
          }
          return all;
        });
        return format;
      }

      return dateFormat(value,arg);

    }
  },
};
</script>

<style lang="less">

</style>

